package my.menu.menuImp;

import my.menu.menuImp.AdminChildMenus.AdminBookMenu;
import my.menu.menuImp.AdminChildMenus.AdminBookTypeMenu;
import my.menu.menuImp.AdminChildMenus.AdminUserMenu;
import my.menu.Menu;
import my.vo.voImpl.User;

import java.util.List;

/**
 * @author 星环
 * @date 2022/10/31 18:47:39
 * @description 管理员主菜单，每个选项生成一个子菜单，免得太挤 <br/>
 *
 */
public class AdminMainMenu extends Menu {
    /**
     * 反射，向menu说明自己的选项
     */
    public AdminMainMenu(User user){
        super(  List.of("读者信息管理","图书类别管理","图书信息管理"),
                List.of("readerInfo","bookTypeInfo","bookInfo"));
        setUser(user);
    }

    public boolean readerInfo(){
        //详见Menu类
        new AdminUserMenu(user).entrance();
        return true;
    }

    public boolean bookTypeInfo(){
        new AdminBookTypeMenu(user).entrance();
        return true;
    }
    public boolean bookInfo(){
        new AdminBookMenu(user).entrance();
        return true;
    }
}
